<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<%@ page import="com.remedy.arsys.session.*" %>


 <%
 
 String key = "sso-jsp-asp";
 String method = "POST";
 
 
 
 
 
 
 
 
 
 
 // make sure the request is in POST mode
 if(request.getMethod() != method)
	 throw new Exception("Only POST method is accepted");
 
 // make sure request contains the secret key
 if(request.getHeader(key) == null)
	 throw new Exception("Secure key is excepted"); 
 
 // make sure object usercredentials exist in current session 
 Object obj = session.getAttribute("usercredentials");
 if(obj == null)
	 throw new Exception("Session does not exist or is lost");
 
 
 UserCredentials usercredentials = (UserCredentials)obj;
 String user = usercredentials.getUser();
 
 %> 
 
<%=user %>